package com.woniuxy.exam.mapper;

import com.woniuxy.commons.entity.Paper;
import com.woniuxy.exam.entity.QuestionsOfPaperDto;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: 余枭春
 */
@Repository
public interface PaperMapper {
    List<Paper> allTestPaper();

    List<Paper> listPapersWithCondition(Paper paper);

    Paper findTestPaperById(int paperId);

    Paper findTestPaperByName(String name);

    int createPaper(Paper paper);

    int updatePaper(Paper paper);

    int updatePaperStatus(Paper paper);

    int completePaper(QuestionsOfPaperDto quesetionsOfPaper);

    QuestionsOfPaperDto getQuestionByPaperIdAndNum(QuestionsOfPaperDto question);

    List<QuestionsOfPaperDto> getQuestionsOfPaperDtosByPaperId(int id);
    int deleteQuestionsOfPaperByPaperId(int PaperId);
}
